package com.pml.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;

public class RequestListener implements ServletRequestListener{
    @Override
    public void requestDestroyed(ServletRequestEvent servletRequestEvent) {
        System.out.println("requestDestroyed()"+
                servletRequestEvent.getServletRequest().getRemoteAddr()+" "
                +servletRequestEvent.getServletContext().getContextPath());

        ServletContext servletContext=servletRequestEvent.getServletContext();
    }

    @Override
    public void requestInitialized(ServletRequestEvent servletRequestEvent) {
        System.out.println("requestInitialized()"+
                servletRequestEvent.getServletRequest().getRemoteAddr()
                +servletRequestEvent.getServletContext().getContextPath());
    }
}
